﻿CREATE PROCEDURE [branding].[GetBlobObjects]
	@tag varchar(50),
	@subTag varchar(50)
AS
	select	bb.ID,
			CAST('blob' as varchar(10)) as ObjectType,
			bb.Tag,
			bb.SubTag,
			bb.ResourceId,
			bb.Brand,
			bb.ContentLength,
			bb.MimeType,
			bb.BlobGuid
	from	branding.Blob as bb
	where	(@tag is null or @tag = Tag) and
			(@subTag is null or @subTag = SubTag)
	order   by ResourceId;
RETURN 0